﻿using System;

namespace ArrayFunctionsLibrary
{
    class Program
    {
        static void Main(string[] args)
        {


            int[] a = new int[] { 1, 2, 4, -8, 55 };
            PrintArray(a, "a");
            
            int[] b = new int[] { 11, 6, 9, 8, 55 };
            PrintArray(b, "b");

            long[] c = SumArray(a, b);
            PrintArray(c, "c");

            Math.Max(1, 2);
        }

        static void PrintArray(int[] array, string name /*, int n*/)
        {
            for (int i = 0; i < array.Length /*n*/; i++)
            {
                Console.WriteLine("{0}[{1}] = {2}", name, i, array[i]);
            }
        }

        static void PrintArray(long[] array, string name /*, int n*/)
        {
            for (int i = 0; i < array.Length /*n*/; i++)
            {
                Console.WriteLine("{0}[{1}] = {2}", name, i, array[i]);
            }
        }

        static long[] SumArray(int[] a, int[] b)
        {
            long[] c = new long[a.Length];

            for (int i = 0; i < c.Length; i++)
			{
                c[i] = a[i] + b[i];
			}

            return c;
        }
    }
}
